licenses(["notice"])

package(default_visibility = ["//visibility:public"])

cc_binary(
    name = "colored_c_nn_random_grids_index_main",
    srcs = ["colored_c_nn_random_grids_index_main.cc"],
    deps = [
        ":cann_rg",
        "@com_google_absl//absl/flags:flag",
        "@com_google_absl//absl/flags:parse",
    ],
)

cc_library(
    name = "thread_pool",
    srcs = ["thread_pool.cc"],
    hdrs = ["thread_pool.h"],
    deps = [
        "@com_google_absl//absl/functional:any_invocable",
        "@com_google_absl//absl/synchronization",
    ],
)

cc_library(
    name = "int_mapping",
    srcs = ["int_mapping.cc"],
    hdrs = ["int_mapping.h"],
    deps = [
        "@com_google_absl//absl/types:span",
        "@eigen",
    ],
)

cc_library(
    name = "cann_rg",
    srcs = ["cann_rg.cc"],
    hdrs = ["cann_rg.h"],
    deps = [
        ":colored_c_nn_random_grids_index",
        ":thread_pool",
        "//file",
        "@com_google_absl//absl/algorithm:container",
        "@com_google_absl//absl/container:flat_hash_map",
        "@com_google_absl//absl/container:flat_hash_set",
        "@com_google_absl//absl/log:check",
        "@com_google_absl//absl/strings",
        "@com_google_absl//absl/synchronization",
        "@com_google_absl//absl/time",
        "@eigen",
    ],
)

cc_library(
    name = "colored_c_nn_random_grids_index",
    srcs = ["colored_c_nn_random_grids_index.cc"],
    hdrs = ["colored_c_nn_random_grids_index.h"],
    deps = [
        ":int_mapping",
        ":thread_pool",
        "@com_google_absl//absl/container:flat_hash_set",
        "@com_google_absl//absl/container:node_hash_map",
        "@com_google_absl//absl/hash",
        "@com_google_absl//absl/random",
        "@com_google_absl//absl/random:bit_gen_ref",
        "@com_google_absl//absl/random:distributions",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/synchronization",
        "@com_google_absl//absl/types:span",
        "@eigen",
    ],
)
